package com.lavida.project.monitor.job.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.lavida.common.utils.DateUtils;
/**
 * 定时调度任务测试
 * @author Jianchi
 *
 */
@Component
public class TestTask {
	
	@Scheduled(fixedRate = 1000*10)
	public void test1() {
		System.out.println(DateUtils.getTime()+"\t 每10秒执行一次方法");
	}
	
	@Scheduled(cron = "0/20 * * * * ?")
	public void test2() {
		System.out.println(DateUtils.getTime()+"\t 根据cron配置每20秒执行一次方法");
	}
	
	

}
